package ObserableModel;

/**
 * @author
 * @create 2018-10-18 12:54
 **/
public class Test {

    public static void main(String[] args) {
        TeacherSubject teacher = new TeacherSubject();
        StudentObserver student1 = new StudentObserver("张三");
        StudentObserver student2 = new StudentObserver("李四");
        teacher.registerObserver(student1);
        teacher.registerObserver(student2);
        teacher.notifyAllObserver("发作业了");
    }
}
